////
////  Auth.swift
////  Twitter
////
////  Created by shiyanjun on 2023/1/24.
////
//
//import Foundation
//
//class Auth {
//    private static var _auth = Auth()
//    public var currentUser: User?
//
//    static func auth() -> Auth {
//        return _auth
//    }
//
//    func createUser(email: String, password: String, fullname: String, username: String) -> User {
//        let user = User(uid: UUID().uuidString,
//                        email: email,
//                        password: password,
//                        fullname: fullname,
//                        username: username)
//        UserDefaults.standard.set(user.password, forKey: user.email)
//        return user
//    }
//
//    func signIn(withEmail: String, password: String) {
//        let pwd = UserDefaults.standard.string(forKey: withEmail)
//        if pwd != nil && password == pwd {
//            self.currentUser = User(uid: "", email: withEmail, password: password, fullname: "", username: "")
//        } else {
//            print("Not found user info")
//        }
//    }
//
//    func signOut() {
//        self.currentUser = nil
//    }
//}
